<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * Product media data template
 *
 * @see Mage_Catalog_Block_Product_View_Media
 */
?>
<?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
	$image = $this->helper('catalog/image')->init($_product, 'image');
	$imageWidth = $this->getImageWidth();
	$imageHeight = $this->getImageHeight();
?>
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
    <div class="clearfix product-image product-image-zoom" style="overflow:visible">
<?php
        $_img = '<img id="image" src="'.$image->resize($imageWidth,$imageHeight).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
    ?>
    
     <a href="<?=$image->resize(700)?>" class="jqzoom" rel="gal1"  title="<?=$this->htmlEscape($this->getImageLabel())?>"><?=$_helper->productAttribute($_product, $_img, 'image')?></a><input type="hidden" id="jq_options" value="{<?=$this->getZoomOptions()?>}" />
</div>
<?php else: ?>
<p class="product-image">
    <?php
        $_img = '<img src="'.$image.'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
        echo $_helper->productAttribute($_product, $_img, 'image');
    ?>
</p>
<?php endif; ?>
<?php if (count($this->getGalleryImages()) > 0): ?>
<div class="more-views clearfix">
<h2><?php echo $this->__('More Views') ?></h2>
	<ul id="thumblist" class="clearfix" >
    <?php foreach ($this->getGalleryImages() as $_image): ?>
		<li><a href='javascript:void(0);' rel="{gallery: 'gal1', smallimage: '<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(265); ?>',largeimage: '<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->resize(700); ?>'}" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img src='<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>' width="56" height="56" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a></li>
        
   <?php endforeach; ?>     
	</ul>
	
	



</div>
<?php endif; ?>
